const path = require('path');
const os = require('os');

const isWindows = os.platform() === 'win32';

module.exports = {
    mysql: {
        client: {
            host: '172.17.0.2',
            port: 3306,
            user: 'root',
            password: 'apusic2021',
            database: 'bundle'
        }
    },
    storage: {
        root: isWindows ? path.resolve(__dirname, '../', 'tmp') : path.resolve('/opt/bundle_files/files')
    },
    server: {
        port: 1234,
        host: 'http://bundle.hanxiaoxin.cn',
        prefix: '/api',
        auth: true,
        whitelists: [
            '/api/user/login',
            '/api/bundle/list',
            '/api/project/list',
            '/api/server/*',
            '/api/message'
        ]
    }
}
